package cn.alpha.intell.rbtlib.broadcast;

/**
 * Created by zhangxiliang on 2016/9/23.
 */
public enum  OSApp {
    IM("cn.alpha.intell.robot.telephone"),
    MUSIC("cn.alpha.intell.robot.music"),
    LUANCHER("cn.alpha.intell.robot.launcher"),
    SETTING("cn.alpha.intell.robot.setting"),
    CAMERA("cn.alpha.intell.robot.camera"),
    GALLERY("cn.alpha.intell.robot.photos"),
    ROBOTX("cn.alpha.intell.robot.robotx"),
    STORY("cn.alpha.intell.robot.newstory"),
    VIDEO("cn.alpha.intell.robot.video"),
    TOWER("cn.alpha.intell.robot.tower"),
    PNIAO("cn.alpha.intell.robot.piano"),
    BOBI_S("air.com.bobi.BobiPhoneS"),
    BOBI_M("air.com.bobi.BobiPhoneM"),
    BOBI_L("air.com.bobi.BobiPhoneL"),
    YOUKU_KID("com.youkuchild.android"),
    BABY_BUS_ANIM("com.sinyee.babybus.animal"),
    BABY_BUS_BIRTHDAY("com.sinyee.babybus.birthdayparty"),
    BABY_BUS_HIDEN("com.sinyee.babybus.hideandseek"),
    BABY_BUS_NUMBER("com.sinyee.babybus.number"),
    BABY_BUS_SHARE("com.sinyee.babybus.share"),
    BABY_BUS_SHOPPING("com.sinyee.babybus.shopping"),
    BABY_BUS_BRIDGE("com.sinyee.babybus.bridge"),
    BASE("sdk.robot.intell.alpha.cn.alphasdkbase"),
    FILE_CONTROLLER("cn.alpha.filecontroler"),

    //系统APP包名 进程管理会杀死这些系统进程，如果出现问题，请加入进程白名单中
    SYS_SETTING("com.android.settings"),
    SYS_MEDIA("com.android.providers.media"),
    SYS_DOWNLOAD("com.android.providers.downloads"),
    SYS_STORAGE("com.android.externalstorage");

    private String value;

    // 构造方法
    OSApp(String value) {
        this.value = value;
    }


    public String getValue() {
        return value;
    }

    @Override
    public String toString() {
        return this.getValue();
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static OSApp fromString(String text) {
        if (text != null) {
            for (OSApp command : OSApp.values()) {
                if (text.equalsIgnoreCase(command.getValue())) {
                    return command;
                }
            }
        }
        return null;
    }
}
